<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="hexo,Travis," />








  <link rel="shortcut icon" type="image/x-icon" href="/blog/favicon.ico?v=5.1.2" />






<meta name="description" content="转载自http://blog.csdn.net/xuezhisdc/article/details/53130423 新建Personal Access Token 点击右上角头像旁边的三角，在菜单中点击“Setting”，进入设置页面。 点击左侧栏的最下面的“Personal access tokens”，创建Personal access tokens。 点击右上角的“Generate new">
<meta name="keywords" content="hexo,Travis">
<meta property="og:type" content="article">
<meta property="og:title" content="使用Travis自动部署hexo">
<meta property="og:url" content="http://yoursite.com/2017/08/20/使用Travis自动部署hexo/index.html">
<meta property="og:site_name" content="杂记">
<meta property="og:description" content="转载自http://blog.csdn.net/xuezhisdc/article/details/53130423 新建Personal Access Token 点击右上角头像旁边的三角，在菜单中点击“Setting”，进入设置页面。 点击左侧栏的最下面的“Personal access tokens”，创建Personal access tokens。 点击右上角的“Generate new">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://img.zhangxuezhi.com/v90uk9inuvo8yjywxj9gm5hjb5.png">
<meta property="og:image" content="http://img.zhangxuezhi.com/syvhuszdqc8zoe5hncv99r8ntg.png">
<meta property="og:image" content="http://img.zhangxuezhi.com/183vnbiixxadzm7bp75458dc59.png">
<meta property="og:image" content="http://img.zhangxuezhi.com/brnxrllts6783vig9u5o0903k5.png">
<meta property="og:image" content="http://img.zhangxuezhi.com/spb4526esm5qmhvocnn24f0i19.png">
<meta property="og:image" content="http://img.zhangxuezhi.com/yvrv0pcjjw1p29x879ohfhm0od.png">
<meta property="og:image" content="http://img.zhangxuezhi.com/ylz1rd42kfubl160tqvemhgs0p.png">
<meta property="og:image" content="http://img.zhangxuezhi.com/vw68mu4fmciss8pkc6vgxu1t9b.png">
<meta property="og:image" content="http://img.zhangxuezhi.com/747d3iy0nq4a39mdnpdx57c51a.png">
<meta property="og:image" content="http://img.zhangxuezhi.com/pkv15sreco6fl4g85v8lzz4uqh.png">
<meta property="og:updated_time" content="2017-08-20T05:46:11.138Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="使用Travis自动部署hexo">
<meta name="twitter:description" content="转载自http://blog.csdn.net/xuezhisdc/article/details/53130423 新建Personal Access Token 点击右上角头像旁边的三角，在菜单中点击“Setting”，进入设置页面。 点击左侧栏的最下面的“Personal access tokens”，创建Personal access tokens。 点击右上角的“Generate new">
<meta name="twitter:image" content="http://img.zhangxuezhi.com/v90uk9inuvo8yjywxj9gm5hjb5.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post","offset":12,"offset_float":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: 'QXGKA799I9',
      apiKey: '5b6298d4cd6f9df0eb20f97672f39916',
      indexName: 'index',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2017/08/20/使用Travis自动部署hexo/"/>





  <title>使用Travis自动部署hexo | 杂记</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">杂记</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">记录网上生活</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/blog/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  
  <div class="algolia-popup popup search-popup">
    <div class="algolia-search">
      <div class="algolia-search-input-icon">
        <i class="fa fa-search"></i>
      </div>
      <div class="algolia-search-input" id="algolia-search-input"></div>
    </div>

    <div class="algolia-results">
      <div id="algolia-stats"></div>
      <div id="algolia-hits"></div>
      <div id="algolia-pagination" class="algolia-pagination"></div>
    </div>

    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
  </div>




    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/blog/2017/08/20/使用Travis自动部署hexo/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="ycg31">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="杂记">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">使用Travis自动部署hexo</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-08-20T03:22:09+08:00">
                2017-08-20
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/网络技术/" itemprop="url" rel="index">
                    <span itemprop="name">网络技术</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>转载自<a href="http://blog.csdn.net/xuezhisdc/article/details/53130423" target="_blank" rel="external">http://blog.csdn.net/xuezhisdc/article/details/53130423</a></p>
<h2 id="新建Personal-Access-Token"><a href="#新建Personal-Access-Token" class="headerlink" title="新建Personal Access Token"></a>新建Personal Access Token</h2><ol>
<li>点击右上角头像旁边的三角，在菜单中点击“Setting”，进入设置页面。<br><img src="http://img.zhangxuezhi.com/v90uk9inuvo8yjywxj9gm5hjb5.png" alt="img"></li>
<li>点击左侧栏的最下面的“Personal access tokens”，创建Personal access tokens。<br><img src="http://img.zhangxuezhi.com/syvhuszdqc8zoe5hncv99r8ntg.png" alt="img"></li>
<li>点击右上角的“Generate new token”，输入用户密码，进入“New personal access token”页面。<br><img src="http://img.zhangxuezhi.com/183vnbiixxadzm7bp75458dc59.png" alt="img"></li>
<li>设置Token description（其实就是名称），选择相应的权限，如下图所示。<br><img src="http://img.zhangxuezhi.com/brnxrllts6783vig9u5o0903k5.png" alt="img"></li>
<li>点击“Generate token”按钮，生成Personal access tokens。如下图中红线标注的部分。<strong>注意：这行token只会在刚刚创建完成后显示一次，以后不再显示</strong>。因此，复制并保存到本地。<br><img src="http://img.zhangxuezhi.com/spb4526esm5qmhvocnn24f0i19.png" alt="img"></li>
</ol>
<h2 id="配置Travis-CI"><a href="#配置Travis-CI" class="headerlink" title="配置Travis CI"></a>配置Travis CI</h2><h3 id="登录并配置Travis-CI"><a href="#登录并配置Travis-CI" class="headerlink" title="登录并配置Travis CI"></a>登录并配置Travis CI</h3><ul>
<li>Travis CI是目前新兴的开源持续集成构建项目。可以直接使用GitHub账号登录。</li>
<li>将鼠标放在用户名上，在弹出的菜单中点击“Accounts”，将会显示你在GitHub上的仓库。如下图所示。<br><img src="http://img.zhangxuezhi.com/yvrv0pcjjw1p29x879ohfhm0od.png" alt="图片名称"></li>
<li>找到自己的博客项目，点击X号，将其变成√号。再点击右侧的齿轮，进入该仓库的配置页面。<br><img src="http://img.zhangxuezhi.com/ylz1rd42kfubl160tqvemhgs0p.png" alt="img"></li>
<li>在项目的设置中开启Build only if .travis.yml is present这一项。如下图所示。<br><img src="http://img.zhangxuezhi.com/vw68mu4fmciss8pkc6vgxu1t9b.png" alt="img"></li>
</ul>
<h3 id="本地安装Travis"><a href="#本地安装Travis" class="headerlink" title="本地安装Travis"></a>本地安装Travis</h3><ul>
<li>首先安装Ruby，直接官网下载，双击安装就OK了。</li>
<li>在Windows下，安装travis之前，需要解决一个问题：<strong>SSL证书问题</strong>，否则不能成功安装。详情请点击该链接：<a href="http://blog.csdn.net/chancein007/article/details/52940032" target="_blank" rel="external">参考教程</a>。</li>
<li>修复好上述问题后，执行下面的命令安装travis。</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># 安装travis</span></div><div class="line">gem isntall travis1212</div></pre></td></tr></table></figure>
<h3 id="创建并修改配置文件"><a href="#创建并修改配置文件" class="headerlink" title="创建并修改配置文件"></a>创建并修改配置文件</h3><ol>
<li>打开博客项目文件夹，在项目根目录新建.travis.yml配置文件。</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="built_in">cd</span> 博客项目文件夹根目录</div><div class="line">touch .travis.yml1212</div></pre></td></tr></table></figure>
<ol>
<li>执行下面的命令，加密上面生成的Personal access tokens，并添加到.travis.yml配置文件。</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># 这里的 REPO_TOKEN 是变量名,在后面的配置文件中会用到</span></div><div class="line"><span class="comment"># TOKEN 是上面github生成的Token</span></div><div class="line">travis encrypt <span class="string">'REPO_TOKEN=&lt;TOKEN&gt;'</span> --add123123</div></pre></td></tr></table></figure>
<ol>
<li>上述命令指向完后，.travis.yml配置文件的内容如下所示。</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">env:</div><div class="line">  global:</div><div class="line">    secure: F/gYu+bVe3aWs6YnuB5PNZLEmHH4CGf0najk8JI3/N+SFL0TH8tyYg+O1sXR3EIg.....省略.....iwr5HQG/G3fdL4JcXiAJIm/iH9ndDyGV5EGR1CmseNGNWrwnRZ7tlKE=123123</div></pre></td></tr></table></figure>
<ol>
<li>使用本地编辑器打开.travis.yml配置文件，将其修改成如下所示的内容。<strong>注意：有些内容是你自己的!!!</strong></li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div></pre></td><td class="code"><pre><div class="line">language: node_js</div><div class="line">node_js:</div><div class="line">- <span class="string">"4"</span>  <span class="comment"># nodejs的版本</span></div><div class="line">branches:</div><div class="line">  only:</div><div class="line">  - dev  <span class="comment"># 设置自动化部署的源码分支</span></div><div class="line"></div><div class="line"><span class="comment"># ------------------------------------------------</span></div><div class="line"><span class="comment"># 下面是你的Token加密信息，不要替换</span></div><div class="line"><span class="comment"># ------------------------------------------------</span></div><div class="line">env:</div><div class="line">  global:  </div><div class="line">    secure: F/gYu+bVe3aWs6Yn.....省略..../iH9ndDyGV5EGR1CmseNGNWrwnRZ7tlKE=</div><div class="line"></div><div class="line">before_install:</div><div class="line">- <span class="built_in">export</span> TZ=<span class="string">'Asia/Shanghai'</span>  </div><div class="line">- npm install -g hexo</div><div class="line">- npm install -g hexo-cli </div><div class="line">before_script:</div><div class="line"><span class="comment"># ------------------------------------------------</span></div><div class="line"><span class="comment"># 设置github账户信息 注意修改成自己的信息</span></div><div class="line"><span class="comment"># ------------------------------------------------</span></div><div class="line">- git config --global user.name <span class="string">"xuezhisd"</span></div><div class="line">- git config --global user.email xuezhi@126.com </div><div class="line"><span class="comment"># ------------------------------------------------</span></div><div class="line"><span class="comment"># github仓库操作  注意将仓库修改成自己的</span></div><div class="line"><span class="comment"># ------------------------------------------------</span></div><div class="line">- sed -i<span class="string">''</span> <span class="string">"s~git@github.com:xuezhisd/xuezhisd.github.io.git~https://<span class="variable">$&#123;REPO_TOKEN&#125;</span>:x-oauth-basic@github.com/xuezhisd/xuezhisd.github.io.git~"</span> _config.yml</div><div class="line"><span class="comment"># 安装依赖组件</span></div><div class="line">install:</div><div class="line">- npm install</div><div class="line"><span class="comment"># 执行的命令</span></div><div class="line">script:</div><div class="line">- hexo clean</div><div class="line">- hexo generate</div><div class="line"><span class="comment"># 执行的成功后执行 </span></div><div class="line">after_success:</div><div class="line">- hexo deploy12345678910111213141516171819202122232425262728293031323334353637381234567891011121314151617181920212223242526272829303132333435363738</div></pre></td></tr></table></figure>
<figure class="highlight stata"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">至此，Travis <span class="keyword">CI</span>已经配置完成了。</div></pre></td></tr></table></figure>
<h2 id="创建仓库，推送到GitHub"><a href="#创建仓库，推送到GitHub" class="headerlink" title="创建仓库，推送到GitHub"></a>创建仓库，推送到GitHub</h2><ul>
<li>新建仓库blog。</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">git init blog</div><div class="line"><span class="built_in">cd</span> blog1212</div></pre></td></tr></table></figure>
<ul>
<li>将原来博客目录下的以下内容复制到blog文件夹中。<br><img src="http://img.zhangxuezhi.com/747d3iy0nq4a39mdnpdx57c51a.png" alt="img"></li>
<li>修改.gitignore文件，取消对node_modules文件夹的忽略。（即删除对应的行）</li>
<li>关联GitHub上的远程仓库。</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># 将github仓库改为自己的博客仓库</span></div><div class="line">git remote add origin git@github.com:xuezhisd/xuezhisd.github.io.git1212</div></pre></td></tr></table></figure>
<ul>
<li>提交本地修改，推送到GitHub上。</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="comment"># 添加文件到暂存区</span></div><div class="line">git add .</div><div class="line"><span class="comment"># 提交修改</span></div><div class="line">git commit -m <span class="string">"test travis"</span></div><div class="line"><span class="comment"># 推送至远程仓库的dev分支</span></div><div class="line">git push -u origin dev123456123456</div></pre></td></tr></table></figure>
<ul>
<li>push本地的代码至远程仓库之后，在<a href="https://travis-ci.org/" target="_blank" rel="external">https://travis-ci.org</a> 后台查看相关情况。如果如下图所示，就代表成功了。<br><img src="http://img.zhangxuezhi.com/pkv15sreco6fl4g85v8lzz4uqh.png" alt="图片名称"></li>
</ul>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/hexo/" rel="tag"># hexo</a>
          
            <a href="/blog/tags/Travis/" rel="tag"># Travis</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2017/08/20/mi/" rel="next" title="（转）Hexo添加文章时自动打开编辑器">
                <i class="fa fa-chevron-left"></i> （转）Hexo添加文章时自动打开编辑器
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2017/08/20/GIT相关命令/" rel="prev" title="GIT相关命令">
                GIT相关命令 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div id="lv-container" data-id="city" data-uid="MTAyMC8zMDI5MC82ODQ1"></div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/blog/images/avatar.gif"
               alt="ycg31" />
          <p class="site-author-name" itemprop="name">ycg31</p>
           
              <p class="site-description motion-element" itemprop="description">有了这个，就不用到处去找重复的了</p>
          
        </div>
        <nav class="site-state motion-element">

          
            <div class="site-state-item site-state-posts">
              <a href="/blog/archives/">
                <span class="site-state-item-count">11</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-categories">
              <a href="/blog/categories/index.html">
                <span class="site-state-item-count">3</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            
            
            <div class="site-state-item site-state-tags">
              <a href="/blog/tags/index.html">
                <span class="site-state-item-count">7</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/ycg31" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                    
                      GitHub
                    
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://twitter.com/ycg31" target="_blank" title="Twitter">
                  
                    <i class="fa fa-fw fa-twitter"></i>
                  
                    
                      Twitter
                    
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/ycg31" target="_blank" title="微博">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                    
                      微博
                    
                </a>
              </span>
            
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#新建Personal-Access-Token"><span class="nav-number">1.</span> <span class="nav-text">新建Personal Access Token</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#配置Travis-CI"><span class="nav-number">2.</span> <span class="nav-text">配置Travis CI</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#登录并配置Travis-CI"><span class="nav-number">2.1.</span> <span class="nav-text">登录并配置Travis CI</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#本地安装Travis"><span class="nav-number">2.2.</span> <span class="nav-text">本地安装Travis</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#创建并修改配置文件"><span class="nav-number">2.3.</span> <span class="nav-text">创建并修改配置文件</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#创建仓库，推送到GitHub"><span class="nav-number">3.</span> <span class="nav-text">创建仓库，推送到GitHub</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">ycg31</span>

  
</div>


  <div class="powered-by">
    由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
  </div>

  <span class="post-meta-divider">|</span>

  <div class="theme-info">
    主题 &mdash;
    <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
      NexT.Pisces
    </a>
  </div>


        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.2"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.2"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.2"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.2"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.2"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.2"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.2"></script>



  


  




	





  





  
    <script type="text/javascript">
      (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
      })(document, 'script');
    </script>
  








  




  
  
  
  <link rel="stylesheet" href="/blog/lib/algolia-instant-search/instantsearch.min.css">

  
  
  <script src="/blog/lib/algolia-instant-search/instantsearch.min.js"></script>
  

  <script src="/blog/js/src/algolia-search.js?v=5.1.2"></script>



  

  

  

  

  

  

</body>
</html>
